package com.xindacloud.sms.portal.controller;


import com.xindacloud.sms.portal.entity.SmsUser;
import com.xindacloud.sms.portal.service.ISmsUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xindacloud.sms.portal.dto.SmsFriendshipLinkDTO;
import com.xindacloud.sms.portal.dto.SmsUiContentDTO;
import com.xindacloud.sms.portal.entity.SmsFriendshipLink;
import com.xindacloud.sms.portal.service.ISmsFriendshipLinkService;
import com.xindacloud.sms.portal.service.ISmsUiContentService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 系统主菜单表 前端控制器
 * </p>
 *
 * @author czc
 * @since 2019-10-08
 */
@Api(tags = {"首页及产品模块接口"})
@RestController
@RequestMapping("/api/v1/sms-ui-content")
public class SmsUiContentController {
	
	@Autowired
	private ISmsUiContentService smsUiContentService;
	
	@Autowired
	private ISmsFriendshipLinkService smsFriendshipLinkService;

	@Autowired
	private  ISmsUserService smsUserService;
	
	@ApiOperation(value = "获取首页信息")
	@PostMapping(value = "/getSmsUiContentList")
	public Object getSmsUiContentList(@RequestBody SmsUiContentDTO smsUiContentDTO) {
	    return smsUiContentService.getSmsUiContentList(smsUiContentDTO);
	}
	
	@ApiOperation(value = "获取产品信息")
	@PostMapping(value = "/getSmsProductList")
	public Object getSmsProductList(@RequestBody SmsUiContentDTO smsUiContentDTO) {
	    return smsUiContentService.getSmsProductList(smsUiContentDTO);
	}
	
	
	@ApiOperation(value = "查询友情链接列表",response=SmsFriendshipLink.class)
	@PostMapping(value = "/getSmsFriendshipLinkList")
	public Object getSmsFriendshipLinkList(@RequestBody SmsFriendshipLinkDTO smsFriendshipLinkDTO) {
	    return smsFriendshipLinkService.getSmsFriendshipLinkList(smsFriendshipLinkDTO);
	}

	@ApiOperation(value = "获取微信二维码",response= SmsUser.class)
	@PostMapping(value = "/getWeixinQrcode")
	public Object getWeixinQrcode() {
		return smsUserService.getWeixinQrcode();
	}

}
